import mpDraftApi from '@/api/declaration/mp/mpDraftApi'
import httpRequest from '@/config/axios/httpRequest'

// 获得公众号草稿分页
export const getDraftPage = (query) => {
  return httpRequest.get(mpDraftApi.GetDraftPage, { params: query })
}

// 创建公众号草稿
export const createDraft = (accountId, articles) => {
  return httpRequest.post(mpDraftApi.CreateDraft, { accountId, articles })
}

// 更新公众号草稿
export const updateDraft = (accountId, mediaId, articles) => {
  return httpRequest.put(mpDraftApi.UpdateDraft, { accountId, mediaId, articles })
}

// 删除公众号草稿
export const deleteDraft = (accountId, mediaId) => {
  return httpRequest.delete(mpDraftApi.DeleteDraft, { params: { accountId, mediaId } })
}
